﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Elysium.Controls;
using Elysium.Demo.Configuracion.Empresa;
using SIIE_ERP.Codigo;

namespace Elysium.Demo.Inventarios
{
    /// <summary>
    /// Lógica de interacción para Menu_Configuracion.xaml
    /// </summary>
    public partial class Menu_Inventarios : UserControl
    {
        private UsuarioActivo _sesion;

        public Menu_Inventarios(ref UsuarioActivo usuario)
        {
            InitializeComponent();
            this._sesion = usuario;    
        }

        private void Expander_Catalogos_Expanded(object sender, RoutedEventArgs e)
        {
            if (Expander_Transacciones != null)
                Expander_Transacciones.IsExpanded = false;       
        }

        private void Expander_Transacciones_Expanded(object sender, RoutedEventArgs e)
        {
            if (Expander_Catalogos != null)
                Expander_Catalogos.IsExpanded = false;  
        }

        private void ButtonArticulos_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewInventarios.Content = new Catalogos.Articulos_Consulta(ref _sesion);
        }

        private void ButtonKits_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewInventarios.Content = new Catalogos.Kit_Consulta(ref _sesion);
        }

        private void ButtonAlmacenes_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewInventarios.Content = new Catalogos.Almacen_Consulta(ref _sesion);
        }

        private void ButtonUnidadesDeMedida_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewInventarios.Content = new Catalogos.UnidadMedida_Consulta(ref _sesion);
        }

        private void ButtonGrupoDeProducto_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewInventarios.Content = new Catalogos.GrupoProductos_Consulta(ref _sesion);
        }

        private void ButtonSubgrupoDeProducto_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewInventarios.Content = new Catalogos.SubGrupoProductos_Consulta(ref _sesion);
        }

        private void ButtonLineas_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewInventarios.Content = new Catalogos.Lineas_Consulta(ref _sesion);
        }

        private void ButtonTiposDeMovimiento_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewInventarios.Content = new Catalogos.TiposMovimientos_Consulta(ref _sesion);
        }

        private void ButtonMovimientos_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewInventarios.Content = new Transacciones.MovimientoInventario_Consulta(ref _sesion);
        }

        private void ButtonTraspasos_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewInventarios.Content = new Transacciones.Traspaso_Consulta(ref _sesion);
        }

        private void ButtonInventarioFisico_Click(object sender, RoutedEventArgs e)
        {
            ScrollViewInventarios.Content = new Transacciones.InventarioFisico_Consulta(ref _sesion);
        }    
    }
}
